package com.arcbbs.mapper;


import com.arcbbs.entity.UserInfo;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserInfoMapper {

    List<UserInfo> selectlist();

    @Select("select * from user_info where email = #{email}")
    UserInfo selectbyemail(String email);

    void insert(UserInfo insertinfo);

    @Select("select * from user_info where user_id = #{userId}")
    UserInfo selectbyuserid(String userId);

    Integer updateIntegral(String userId, Integer integral);

    Integer updateIntegral1(String userId, Integer integral);

    @Select("select * from user_info where user_id =#{userId}")
    UserInfo getinfobyuserid(String userId);

    void update(UserInfo userInfo);

    @MapKey("myKey")
    List<Map> getmessage(String userId);

    Page<UserInfo> selectbypage();
}
